<template>
  <nav>
    <div>
      <section id="section" class="et-hero-tabs" style="z-index: 300">
        <h1
          class="greet"
          style="
            margin-top: 1em;
            margin-bottom: 0em;
            font-size: 4em;
            font-weight: normal;
          "
        >
          <a href="#4u" title="点击进入主页">“喂，等你很久了!”</a>
        </h1>
        <h2 class="greet" style="font-size: 2em; font-weight: normal">
          <a href="#4u" title="点击进入主页"
            >Hi, it's been a long time waiting for you!</a
          >
        </h2>
        <h3></h3>
        <div class="et-hero-tabs-container">
          <nav
            class="navbar navbar-default"
            style="
              background: linear-gradient(to right, #c5d6e3, #90afca);
              border-color: #9ab6ce;
              padding: 10px;
            "
          >
            <div class="container-fluid">
              <!-- Brand and toggle get grouped for better mobile display -->
              <div class="navbar-header">
                <button
                  type="button"
                  class="navbar-toggle collapsed"
                  data-toggle="collapse"
                  data-target="#bs-example-navbar-collapse-1"
                  aria-expanded="false"
                >
                  <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#"
                  ><img
                    src="wwwroot/images/StarLight.png"
                    style="height: 40px; width: 90px; margin-top: -10px"
                /></a>
              </div>

              <!-- Collect the nav links, forms, and other content for toggling -->
              <div
                class="collapse navbar-collapse"
                id="bs-example-navbar-collapse-1"
              >
                <ul class="nav navbar-nav ocilul">
                  <li class="active"><router-link to="/">主页</router-link></li>
                  <li>
                    <router-link to="/">相册广场</router-link>
                  </li>
                  <li>
                    <router-link to="/about">关于我们</router-link>
                  </li>
                  <li><router-link to="/about">联系</router-link></li>
                </ul>
                <form class="navbar-form navbar-left">
                  <div class="form-group">
                    <input
                      type="text"
                      class="form-control"
                      placeholder="Search"
                    />
                  </div>
                  <button type="submit" class="btn btn-default">搜索</button>
                </form>
                <ul class="nav navbar-nav navbar-right">
                  <li>
                    <a ref="htmlLink" target="_blank"
                      href="../wwwroot/html/login/index.html"
                      >登录</a
                    >
                  </li>
                  <li><router-link to="/">注册</router-link></li>
                  <li class="dropdown">
                    <a
                      href="#"
                      class="dropdown-toggle"
                      data-toggle="dropdown"
                      role="button"
                      aria-haspopup="true"
                      aria-expanded="false"
                      >我的<span class="caret"></span
                    ></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Action</a></li>
                      <li><a href="#">Another action</a></li>
                      <li><a href="#">Something else here</a></li>
                      <li role="separator" class="divider"></li>
                      <li><a href="#">Separated link</a></li>
                    </ul>
                  </li>
                </ul>
              </div>
              <!-- /.navbar-collapse -->
            </div>
            <!-- /.container-fluid -->
          </nav>
        </div>
      </section>
    </div>
    <div style="position: relative; padding-top: 60px" id="4u">
      <input
        type="checkbox"
        id="toggle"
        class="toggle--checkbox"
        onclick="changetoggle(this)"
      />
      <label
        for="toggle"
        class="toggle--label"
        style="position: fixed; left: 10px; top: 80px; z-index: 200"
      >
        <span class="toggle--label-background"></span>
      </label>
      <div
        style="height: auto; padding-top: 60px; padding-bottom: 400px"
        class="background"
      >
        <router-view />
      </div>
    </div>
  </nav>
</template>
<script>
function searchFailed() {
  alert("请稍后重试！");
}
$(function () {
  $(".ocilul li").click(function () {
    $(this).addClass("active");
    $(this).siblings().removeClass("active");
  });
});
$(".navbar-nav>li").on("click", function () {
  $(".navbar-collapse").collapse("hide");
});
</script>
